package com.test.设计模式.单例;

/**
 * 内部类方式  线程安全
 */
public class Singleton3 {
	private Singleton3() {

	}

	private static Singleton3 instance;

	private static class Singleton3Holder {
		private final static Singleton3 INSTANCE = new Singleton3();
	}

	public static Singleton3 getSingleton3() {
		return Singleton3Holder.INSTANCE;
	}

	public static void main(String[] args) {
		SingletonEnum.SINGLETON.method();
	}
}
